home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / startup-notification-1.0 / libsn / sn-monitor.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-18  |  4.5 KB  |  90 lines

  1. /* Monitor API - if you are a program that monitors launch sequences */
  2. /* 
  3.  * Copyright (C) 2002 Red Hat, Inc.
  4.  * 
  5.  * Permission is hereby granted, free of charge, to any person
  6.  * obtaining a copy of this software and associated documentation
  7.  * files (the "Software"), to deal in the Software without
  8.  * restriction, including without limitation the rights to use, copy,
  9.  * modify, merge, publish, distribute, sublicense, and/or sell copies
  10.  * of the Software, and to permit persons to whom the Software is
  11.  * furnished to do so, subject to the following conditions:
  12.  * 
  13.  * The above copyright notice and this permission notice shall be
  14.  * included in all copies or substantial portions of the Software.
  15.  * 
  16.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17.  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18.  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19.  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  20.  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  21.  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22.  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23.  * SOFTWARE.
  24.  */
  25.  
  26.  
  27. #ifndef __SN_MONITOR_H__
  28. #define __SN_MONITOR_H__
  29.  
  30. #include <libsn/sn-common.h>
  31.  
  32. SN_BEGIN_DECLS
  33.  
  34. typedef struct SnMonitorContext SnMonitorContext;
  35. typedef struct SnMonitorEvent   SnMonitorEvent;
  36. typedef struct SnStartupSequence SnStartupSequence;
  37.  
  38. typedef void (* SnMonitorEventFunc) (SnMonitorEvent *event,
  39.                                      void           *user_data);
  40.  
  41. typedef enum
  42. {
  43.   SN_MONITOR_EVENT_INITIATED,
  44.   SN_MONITOR_EVENT_COMPLETED,
  45.   SN_MONITOR_EVENT_CHANGED,
  46.   SN_MONITOR_EVENT_CANCELED /* not used for now */
  47. } SnMonitorEventType;
  48.  
  49. SnMonitorContext*  sn_monitor_context_new                  (SnDisplay           *display,
  50.                                                             int                  screen,
  51.                                                             SnMonitorEventFunc   event_func,
  52.                                                             void                *event_func_data,
  53.                                                             SnFreeFunc           free_data_func);
  54. void               sn_monitor_context_ref                  (SnMonitorContext *context);
  55. void               sn_monitor_context_unref                (SnMonitorContext *context);
  56.  
  57. void               sn_monitor_event_ref                  (SnMonitorEvent *event);
  58. void               sn_monitor_event_unref                (SnMonitorEvent *event);
  59. SnMonitorEvent*    sn_monitor_event_copy                 (SnMonitorEvent *event);
  60. SnMonitorEventType sn_monitor_event_get_type             (SnMonitorEvent *event);
  61. SnStartupSequence* sn_monitor_event_get_startup_sequence (SnMonitorEvent *event);
  62. SnMonitorContext*  sn_monitor_event_get_context          (SnMonitorEvent *event);
  63.  
  64.  
  65. void        sn_startup_sequence_ref                       (SnStartupSequence *sequence);
  66. void        sn_startup_sequence_unref                     (SnStartupSequence *sequence);
  67. const char* sn_startup_sequence_get_id                    (SnStartupSequence *sequence);
  68. sn_bool_t   sn_startup_sequence_get_completed             (SnStartupSequence *sequence);
  69. const char* sn_startup_sequence_get_name                  (SnStartupSequence *sequence);
  70. const char* sn_startup_sequence_get_description           (SnStartupSequence *sequence);
  71. int         sn_startup_sequence_get_workspace             (SnStartupSequence *sequence);
  72. Time        sn_startup_sequence_get_timestamp             (SnStartupSequence *sequence);
  73. const char* sn_startup_sequence_get_wmclass               (SnStartupSequence *sequence);
  74. const char* sn_startup_sequence_get_binary_name           (SnStartupSequence *sequence);
  75. const char* sn_startup_sequence_get_icon_name             (SnStartupSequence *sequence);
  76. int         sn_startup_sequence_get_screen                (SnStartupSequence *sequence);
  77.  
  78. void        sn_startup_sequence_get_initiated_time        (SnStartupSequence *sequence,
  79.                                                            long              *tv_sec,
  80.                                                            long              *tv_usec);
  81. void        sn_startup_sequence_get_last_active_time      (SnStartupSequence *sequence,
  82.                                                            long              *tv_sec,
  83.                                                            long              *tv_usec);
  84.  
  85. void        sn_startup_sequence_complete                  (SnStartupSequence *sequence);
  86.  
  87. SN_END_DECLS
  88.  
  89. #endif /* __SN_MONITOR_H__ */
  90.